
package com.jiuqi.ccp.generator.form;

import java.text.ParseException;
import java.text.SimpleDateFormat;

import javax.servlet.http.HttpServletRequest;

import org.apache.struts.action.ActionError;
import org.apache.struts.action.ActionErrors;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionMapping;

/**
 * Form for ccpGcmReplymsg.
 *
 * @author <a href="http://boss.bekk.no/boss/middlegen/"/>Middlegen</a>
 *
 * @struts.form name="ccpGcmReplymsgForm"
 */
public class CcpGcmReplymsgForm extends ActionForm {

   private final static SimpleDateFormat FORMAT = new SimpleDateFormat("dd.MM.yyyy hh:mm:ss");

   private java.lang.String _replyGuid = null;
   private java.lang.String _businessCode = null;
   private byte[] _contents = null;
   private java.lang.String _userid = null;
   private java.lang.String _replydate = null;
   private java.lang.String _mainmsgGuig = null;
   private java.lang.String _msgGuid = null;
   private java.math.BigDecimal _attachnum = null;
   private java.lang.String _msgcatGuid = null;
   private java.lang.String _reserved1 = null;
   private java.lang.String _reserved2 = null;
   private java.lang.String _reserved3 = null;

   /**
    * Standard constructor.
    */
   public CcpGcmReplymsgForm() {
   }

   /**
    * Returns the replyGuid
    *
    * @return the replyGuid
    */
   public java.lang.String getReplyGuid() {
      return _replyGuid;
   }

   /**
    * Sets the replyGuid
    *
    * @param replyGuid the new replyGuid value
    */
   public void setReplyGuid(java.lang.String replyGuid) {
      _replyGuid = replyGuid;
   }
   /**
    * Returns the businessCode
    *
    * @return the businessCode
    */
   public java.lang.String getBusinessCode() {
      return _businessCode;
   }

   /**
    * Sets the businessCode
    *
    * @param businessCode the new businessCode value
    */
   public void setBusinessCode(java.lang.String businessCode) {
      _businessCode = businessCode;
   }
   /**
    * Returns the contents
    *
    * @return the contents
    */
   public byte[] getContents() {
      return _contents;
   }

   /**
    * Sets the contents
    *
    * @param contents the new contents value
    */
   public void setContents(byte[] contents) {
      _contents = contents;
   }
   /**
    * Returns the userid
    *
    * @return the userid
    */
   public java.lang.String getUserid() {
      return _userid;
   }

   /**
    * Sets the userid
    *
    * @param userid the new userid value
    */
   public void setUserid(java.lang.String userid) {
      _userid = userid;
   }
   /**
    * Returns the replydate
    *
    * @return the replydate
    */
   public java.lang.String getReplydate() {
      return _replydate;
   }

   /**
    * Sets the replydate
    *
    * @param replydate the new replydate value
    */
   public void setReplydate(java.lang.String replydate) {
      _replydate = replydate;
   }
   /**
    * Returns the mainmsgGuig
    *
    * @return the mainmsgGuig
    */
   public java.lang.String getMainmsgGuig() {
      return _mainmsgGuig;
   }

   /**
    * Sets the mainmsgGuig
    *
    * @param mainmsgGuig the new mainmsgGuig value
    */
   public void setMainmsgGuig(java.lang.String mainmsgGuig) {
      _mainmsgGuig = mainmsgGuig;
   }
   /**
    * Returns the msgGuid
    *
    * @return the msgGuid
    */
   public java.lang.String getMsgGuid() {
      return _msgGuid;
   }

   /**
    * Sets the msgGuid
    *
    * @param msgGuid the new msgGuid value
    */
   public void setMsgGuid(java.lang.String msgGuid) {
      _msgGuid = msgGuid;
   }
   /**
    * Returns the attachnum
    *
    * @return the attachnum
    */
   public java.math.BigDecimal getAttachnum() {
      return _attachnum;
   }

   /**
    * Sets the attachnum
    *
    * @param attachnum the new attachnum value
    */
   public void setAttachnum(java.math.BigDecimal attachnum) {
      _attachnum = attachnum;
   }
   /**
    * Returns the msgcatGuid
    *
    * @return the msgcatGuid
    */
   public java.lang.String getMsgcatGuid() {
      return _msgcatGuid;
   }

   /**
    * Sets the msgcatGuid
    *
    * @param msgcatGuid the new msgcatGuid value
    */
   public void setMsgcatGuid(java.lang.String msgcatGuid) {
      _msgcatGuid = msgcatGuid;
   }
   /**
    * Returns the reserved1
    *
    * @return the reserved1
    */
   public java.lang.String getReserved1() {
      return _reserved1;
   }

   /**
    * Sets the reserved1
    *
    * @param reserved1 the new reserved1 value
    */
   public void setReserved1(java.lang.String reserved1) {
      _reserved1 = reserved1;
   }
   /**
    * Returns the reserved2
    *
    * @return the reserved2
    */
   public java.lang.String getReserved2() {
      return _reserved2;
   }

   /**
    * Sets the reserved2
    *
    * @param reserved2 the new reserved2 value
    */
   public void setReserved2(java.lang.String reserved2) {
      _reserved2 = reserved2;
   }
   /**
    * Returns the reserved3
    *
    * @return the reserved3
    */
   public java.lang.String getReserved3() {
      return _reserved3;
   }

   /**
    * Sets the reserved3
    *
    * @param reserved3 the new reserved3 value
    */
   public void setReserved3(java.lang.String reserved3) {
      _reserved3 = reserved3;
   }


   /**
    * Validate the properties that have been set from this HTTP request,
    * and return an <code>ActionErrors</code> object that encapsulates any
    * validation errors that have been found.  If no errors are found, return
    * <code>null</code> or an <code>ActionErrors</code> object with no
    * recorded error messages.
    *
    * @param mapping The mapping used to select this instance
    * @param request The servlet request we are processing
    */
   public ActionErrors validate(ActionMapping mapping, HttpServletRequest request) {
      ActionErrors errors = new ActionErrors();
      // test for nullity
      if(getReplyGuid() == null) {
         errors.add("replyGuid", new ActionError("error.replyGuid.required"));
      }
      if(getContents() == null) {
         errors.add("contents", new ActionError("error.contents.required"));
      }
      if(getUserid() == null) {
         errors.add("userid", new ActionError("error.userid.required"));
      }
      if(getReplydate() == null) {
         errors.add("replydate", new ActionError("error.replydate.required"));
      }
      if(getMainmsgGuig() == null) {
         errors.add("mainmsgGuig", new ActionError("error.mainmsgGuig.required"));
      }
      if(getAttachnum() == null) {
         errors.add("attachnum", new ActionError("error.attachnum.required"));
      }
      if(getMsgcatGuid() == null) {
         errors.add("msgcatGuid", new ActionError("error.msgcatGuid.required"));
      }
      // TODO test format/data
      return errors;
   }
}
